A memory device is connected to a host device as an external storage device of the host device. In the past, data temporarily stored in a random access memory (RAM) of the memory device has been lost when a power supply for the memory device is shut off. For this reason, data within the RAM has been saved to a non-volatile memory in a case where the power supply for the memory device is shut off. The data has been then transferred to the RAM from the non-volatile memory during return processing of the memory device.